package org.darkforest.task;

import org.darkforest.common.services.HealthUserService;
import org.darkforest.ucenter.service.FestivalRemindService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by pc on 2018/5/31.
 */
@Component
public class HealthRemindTask {

    Logger logger = LoggerFactory.getLogger(HealthRemindTask.class);

    @Autowired
    private HealthUserService healthUserService;

    /***
     * 设置体检提醒
     * 每天下午16:00执行一次
     */
    @Scheduled(cron = "0 0 16 * * ?")
    public void batchSetRemindMsg(){
        logger.info("----------------- batchSetRemindMsg。。。。。。");
        healthUserService.batchSetRemindMsg();
    }
}
